{(include file='./header.html')}
{(strip)}

配置文件:<br />
{(config_load file="../configs/sys.conf")}
{($smarty.config.img)}
<br /><br />
<hr />

一维数组:<br />
{($info[0])}
<br /><br />
<hr />

无键值对:<br />
{(foreach from=$info item=value)}
{($value)}-
{(/foreach)}
<br /><br />
<hr />

有键值对:<br />
{(foreach from=$person key=key item=value)}
{($key)}->{($value)}|
{(/foreach)}
<br /><br  />
<hr />

二维数组:<br />
{(section name=list loop=$news)}
{($news[list].name)}-{($news[list].keys)}-{($news[list].contents)}
<br />
{(sectionelse)}
<br/> 
{(/section)}
<br /><br />
<hr />

变量调节:<br />
{($name|upper)}
<br />
{($name|cat:" is my Ename")}
<br />
{($smarty.now|date_format:"%Y-%m-%d %H:%M:%S")}
<br /><br />
<hr />

条件判断:<br />
{(if $age<18)}
未成年
{(elseif $age==18)}
18岁
{(else)}
成年人
{(/if)}
<br /><br />
<hr />

禁止缓存:<br />
{(insert name="nocache")}

{(/strip)}
{(include file='./footer.html')}